<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>touch触摸事件</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: #369;
        }
    </style>
</head>
<body>
    <div></div>
    <script>
        var div= document.querySelector('div')
        // 手指触摸事件
        div.addEventListener('touchstart',function(){
            console.log(1);
        })
        // 手指移动事件
        div.addEventListener('touchmove',function(){
            console.log(2);
        })
        // 手指离开事件
        div.addEventListener('touchend',function(){
            console.log(3);
        })
    </script>
</body>
</html>